package com.laicunba.service.borrower;

import java.math.BigDecimal;
import java.util.List;

import com.laicunba.pojo.BorrowerDO;
import com.laicunba.pojo.JzhBorrowerRechargeOrderDO;
import com.laicunba.pojo.UserDO;
import com.laicunba.service.BaseService;
import com.laicunba.service.borrower.JzhBorrowerRechargeOrderService.PayResult;

public interface JzhBorrowerRechargeOrderService extends BaseService {
	public class PayResult {
		private String respCode;
		private String respDesc;
		private String mchntCd;
		private String mcnntTxnSsn;
		private String loginId;
		private int amt;
		private String rem;
		private String signature;

		@Override
		public String toString() {
			return "PayResult [respCode=" + respCode + ", respDesc=" + respDesc + ", mchntCd=" + mchntCd + ", mcnntTxnSsn=" + mcnntTxnSsn + ", loginId=" + loginId + ", amt=" + amt + ", rem=" + rem + ", signature="
					+ signature + "]";
		}

		public String getRespCode() {
			return respCode;
		}

		public void setRespCode(String respCode) {
			this.respCode = respCode;
		}

		public String getRespDesc() {
			return respDesc;
		}

		public void setRespDesc(String respDesc) {
			this.respDesc = respDesc;
		}

		public String getMchntCd() {
			return mchntCd;
		}

		public void setMchntCd(String mchntCd) {
			this.mchntCd = mchntCd;
		}

		public String getMcnntTxnSsn() {
			return mcnntTxnSsn;
		}

		public void setMcnntTxnSsn(String mcnntTxnSsn) {
			this.mcnntTxnSsn = mcnntTxnSsn;
		}

		public String getLoginId() {
			return loginId;
		}

		public void setLoginId(String loginId) {
			this.loginId = loginId;
		}

		public int getAmt() {
			return amt;
		}

		public void setAmt(int amt) {
			this.amt = amt;
		}
		
		public String getRem() {
			return rem;
		}

		public void setRem(String rem) {
			this.rem = rem;
		}		

		public String getSignature() {
			return signature;
		}

		public void setSignature(String signature) {
			this.signature = signature;
		}

	}

	public class Result {
		private JzhBorrowerRechargeOrderDO order;
		private String signature;
		private String pageNotify;
		private String backNotify;

		public JzhBorrowerRechargeOrderDO getOrder() {
			return order;
		}

		public void setOrder(JzhBorrowerRechargeOrderDO order) {
			this.order = order;
		}

		public String getSignature() {
			return signature;
		}

		public void setSignature(String signature) {
			this.signature = signature;
		}

		public String getPageNotify() {
			return pageNotify;
		}

		public void setPageNotify(String pageNotify) {
			this.pageNotify = pageNotify;
		}

		public String getBackNotify() {
			return backNotify;
		}

		public void setBackNotify(String backNotify) {
			this.backNotify = backNotify;
		}

	}

	Result createNewOrder(BorrowerDO borrowerDO, Long seq, BigDecimal amt);

	boolean verifyFromJzhServer(PayResult result);

	boolean onPaySuccess(PayResult result);
	
	public List<JzhBorrowerRechargeOrderDO> findJzhRechargeList(String userId, int limit, int offset);

}
